﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="2004-2.aspx.cs" Inherits="_20_2004_2" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<script type="text/javascript">
    function update() {
        __doPostBack('<%=btn_setting.ClientID%>', '');
        tb_remove();
    }

    function pageLoad(sender, args) {
        if (args.get_isPartialLoad()) {
            //  reapply the thick box stuff
            tb_init('a.thickbox, input.thickbox,');
        }
    }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </asp:ToolkitScriptManager>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" OldValuesParameterFormatString="original_{0}"
        SelectMethod="Get_photo_AllData"
        TypeName="CCH.DAO.albumDAO">
        <SelectParameters>
            <asp:Parameter Name="alb_no" Type="Int32" />
        </SelectParameters>
        
    </asp:ObjectDataSource>
    <div class="DivButton">
                
                <asp:Button ID="Button1" class="del" runat="server" Text="回相簿頁" 
                    onclick="Button1_Click" />
                
                <asp:Button ID="btn_del" class="del" runat="server" Text="刪除相片" OnClientClick="return confirm('確定要刪除?')"
                    OnClick="btn_del_Click" />

                <asp:Button ID="btn_setting" class="new" runat="server" Text="設為封面" 
                    OnClick="btn_setting_Click" />

                <input type="button" value="上傳照片" class="thickbox new" alt='2004-5.aspx?alb_no=<%Response.Write(Request.QueryString["alb_no"]); %>&type=<%Response.Write(Request.QueryString["type"]); %>&mode=new&TB_iframe=true&modal=true&width=800&height=500' />
            </div>
            <asp:ListView ID="ListView1" runat="server" 
        DataSourceID="ObjectDataSource1" DataKeyNames="alb_no,pho_no">
                <LayoutTemplate>
                    <div class="box">
                        <asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder>
                    </div>
                </LayoutTemplate>
                <ItemTemplate>
                    <div class="content">
                        <div class="photo_bg2">
                            <asp:HyperLink ID="HyperLink3" CssClass="thickbox a-letter-t2" runat="server" NavigateUrl='<%# String.Format("2004-4.aspx?alb_no={0}&pho_no={1}&TB_iframe=true&modal=true&width=800&height=500",Eval("alb_no"),Eval("pho_no"))%>'>
                                <asp:Image ID="Image1" runat="server" CssClass="pic_01" 
                                    ImageUrl='<%# String.Format("2004-3.ashx?alb_no={0}&pho_no={1}",Eval("alb_no"),Eval("pho_no"))%>' />
                            </asp:HyperLink>
                        </div>
                        <div class="ps2">
                            <asp:CheckBox ID="CheckBox1" runat="server" />
                            <br />
                        <p class="a-letter-t2"> <%#Eval("pho_desc")%></p>
                        </div>
                    </div>
                </ItemTemplate>
                <EmptyDataTemplate>
                    無任何相片
                </EmptyDataTemplate>
            </asp:ListView>
</asp:Content>

